/*
 * ImmersedObject.h
 *
 *  Created on: Apr 20, 2012
 *      Author: soniclin
 */

#ifndef IMMERSED_OBJECT_H
#define IMMERSED_OBJECT_H

#include "./sMathLib/Vector3/Vector3.hpp"
#include "Box3D.h"

namespace ibm
{

template<typename T>
class ImmersedObject
{
public:

	virtual ~ImmersedObject();

	virtual const T& getCharacteristicLength() const;

	virtual const sMathLib::VectorX<T, 3>& getPosition() const;

	virtual const sMathLib::VectorX<T, 3>& getVelocity() const;

	virtual const sMathLib::VectorX<T, 3>& getAngularVelocity() const;

	virtual void recordFluidEffect(sMathLib::VectorX<T, 3>& inputEffect);

	virtual const sMathLib::Vector3& getFluidEffect(int property) const;

	virtual void createBoundingBox(T& driftIn, T& driftOut) = 0;

public:

	ImmersedObject<T>* clone();

	ImmersedObject<T>& operator=(const ImmersedObject<T>& rhs);

protected:

	ImmersedObject();

	ImmersedObject(sMathLib::VectorX<T, 3>& inputPosition, sMathLib::VectorX<T, 3>& inputVelocity, sMathLib::VectorX<T, 3>& inputAVelocity, T& inputCharaLength);

	ImmersedObject(NJRvector3d& inputPosition, NJRvector3d& inputVelocity, NJRvector3d& inputAVelocity, T& inputCharaLength);

	ImmersedObject(T& px, T& py, T& pz, T& ux, T& uy, T& uz, T& avx, T& avy, T& avz, T& inputCharaLength);

	ImmersedObject(const ImmersedObject<T>& rhs);

protected:

	sMathLib::VectorX<T, 3> velocity, angularVelocity, position;

	T characteristicLength;


	std::vector< sMathLib::VectorX<T, 3> > fluidEffect;

};

} /* namespace ibm */

#endif /* IMMERSEDOBJECT_H_ */
